package com.ht.temp.controller;


import com.ht.temp.entity.MonthReport;
import com.ht.temp.service.IMonthReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author mayke_zhou
 * @since 2018-12-24
 */
@RestController
@RequestMapping("/monthReportController")
public class MonthReportController {
    @Autowired
    private IMonthReportService monthReportService;


    @RequestMapping(value = "/getMonthReportByYear",method = RequestMethod.POST)
    public List<MonthReport> getMonthReportByYear(Integer deviceId, String startTime, String endTime){
        return  monthReportService.getMonthReportByYear(deviceId,startTime,endTime);
    }
    @RequestMapping(value ="/getYearReport",method = RequestMethod.GET)
    public  List<MonthReport> getYearReport(String searchYear,Integer deviceId){
        System.out.println("searchYear初三打我的"+searchYear);
        return  monthReportService.selectYearReport(searchYear,deviceId);
    }
}
